(function(angular) {
  'use strict';
  angular
    .module('fs.constant', [])
    .constant('Constants', {
      THEME_DEFAULT: 'default',
      WELCOME_URL: 'poi.dashboard.panels',
      ENCODE_SEPARATOR: '^',
      CSRF_TOKEN: undefined,
      TRANSACTION_TOKEN: undefined,
      LOGO_URL: 'resources/:theme/images/banner/banner.gif',
      DEF_XHRHEADERNAME: 'X-Requested-With',
      DEF_XHRHEADERVALUE: 'XMLHttpRequest',
      SESSION_I18N_RESOURES: 'I18N_RESOURCES',
      SESSION_I18N_VALIDATION_RESOURES: 'I18N_VALIDATION_RESOURCES',
      ERROR_CODE_SESSION_TIMEOUT: 'E01',
      ERROR_CODE_SWITCH_COMPANY: 'E02',
      ERROR_CODE_SIGNONOFF: 'E03',
      ERROR_CODE_SIGNON_STOP: 'E04',
      ERROR_CODE_UNAUTHORIZED: 'E401',
      ERROR_CODE_PAGE_NOT_FOUNT: 'E404',
      ERROR_CODE_SYSTEM_ERROR: 'E500',
      ERROR_CODE_CUSTOMER_ERROR: 'E501',
      NOTIFY_REDIRECT: '302',
      NOTIFY_UNAUTHORIZED: '401',
      NOTIFY_PAGE_NOT_FOUNT: '404',
      NOTIFY_CUSTOMER_ERROR: '501',
      NOTIFY_SYSTEM_ERROR: '500',
      NOTIFY_CHANGE_LANGUAGE: 'change_language',
      NOTIFY_VALIDATION_SUCCESSFUL: 'validation_successful',
      NOTIFY_VALIDATION_FAIL: 'validation_fail',
      TXN_DATATYPES: ['PAYMENT-INVOICE-BATCH', 'SELLER-INVOICE-BATCH', 'INVOICE-BATCH', 'PI-DISCOUNT', 'UPLOAD-PI-BATCH', 'LOAN', 'REPAYMENT', 'DIRECTCHARGE', 'CUSTPAY']
    })
    .constant('SYS_PARAMS', {
      MULTI_PAGE_SELECT_MAX: 500,
      LOCALE_STATUS: {},
      USER_STATUS: {},
      CCY_CONFIG: {},
      YES_NO: {
        Y: 'label.global.yes',
        '1': 'label.global.yes',
        N: 'label.global.no',
        '0': 'label.global.no'
      },
      REPORT_MODE: {
        O: 'label.report.reportmode.online',
        B: 'label.report.reportmode.batch',
        I: 'label.report.reportmode.inline'
      },
      COMPANY_STATUS: {
        A: 'label.company.active',
        I: 'label.company.inactive'
      },
      SETUP_STATUS: {
        C: 'label.status.c',
        U: 'label.status.u',
        D: 'label.status.d',
        J: 'label.status.j',
        T: 'label.status.t',
        P: 'label.status.p',
        G: 'label.status.g',
        H: 'label.status.h',
        E: 'label.status.e',
        V: 'label.status.v',
        X: 'label.status.x',
        '1': 'label.status.1',
        '2': 'label.status.2',
        '3': 'label.status.3',
        '4': 'label.status.4',
        '5': 'label.status.5',
        '6': 'label.status.rp',
        '7': 'label.status.cu'
      },
      SETUP_STATUS_OPTIONS: {
        hasEmptyOption: true,
        data: [
          {
            value: 'V',
            label: 'label.status.v'
          },
          {
            value: 'U',
            label: 'label.status.u'
          },
          {
            value: 'G',
            label: 'label.status.g'
          },
          {
            value: 'T',
            label: 'label.status.t'
          },
          {
            value: 'D',
            label: 'label.status.d'
          },
          {
            value: 'H',
            label: 'label.status.h'
          }
        ]
      },
      LOAN_STATUS: {
        L: 'label.loanstatus.entered',
        D: 'label.loanstatus.duplicate',
        N: 'label.loanstatus.disbursed',
        P: 'label.loanstatus.pastdue',
        X: 'label.loanstatus.canceled',
        Q: 'label.loanstatus.liquated',
        F: 'label.loanstatus.closed',
        R: 'label.loanstatus.rollovered',
        C: 'label.loanstatus.crystalized'
      },
      PENDING_STATUS: {
        N: 'label.pendingstatus.notpending',
        C: 'label.pendingstatus.pendingforcreditcheck',
        S: 'label.pendingstatus.pendingforcustomersetup',
        R: 'label.pendingstatus.pendingforreview',
        B: 'label.pendingstatus.npl'
      },
      REQ_STATUS: {
        R: 'label.extrequest.received',
        P: 'label.extrequest.processed',
        E: 'label.extrequest.error'
      },
      PAY_TYPE: {
        C: 'label.paymdbfile.dda',
        W: 'label.paymdbfile.swift',
        Z: 'label.paymdbfile.fxcontract'
      },
      INT_COLL_METHOD: {
        P: 'label.loan.intcollmethod.prepaid',
        A: 'label.loan.intcollmethod.arrears'
      },
      RESPONSE_STATUS: {
        A: 'label.incomingrequest.ok',
        E: 'label.incomingrequest.rejected',
        R: 'label.incomingrequest.error'
      },
      PAYMDB_FILE_STATUS: {
        C: 'label.paymdbfile.status.created',
        S: 'label.paymdbfile.status.send',
        K: 'label.paymdbfile.status.firstreceived',
        F: 'label.paymdbfile.status.secondreceived'
      },
      SWIFT_STATUS: {
        R: 'label.paymdb.payswiftresponsestatus.myclearmessageisrejected',
        P: 'label.paymdb.payswiftresponsestatus.insufficientfund',
        T: 'label.paymdb.payswiftresponsestatus.beneficiaryaccountcreditedsuccessfully'
      },
      PAYMDB_STATUS: {
        A: 'label.paymdbfile.status.success',
        R: 'label.paymdbfile.status.rejected',
        F: 'label.paymdbfile.status.failed',
        X: 'label.paymdbfile.status.cancelled',
        T: 'label.paymdbfile.status.esbtimeout'
      },
      CR_DR: {
        C: 'label.global.credit',
        D: 'label.global.debit'
      },
      RES_STATUS: {
        A: 'label.extresponse.sucess',
        E: 'label.extrequest.error'
      },
      NAVIGATION_ACTIONS: {
        LIST: 'title.navigation.list',
        VIEW: 'title.navigation.view',
        CREATE: 'title.navigation.create',
        CREATECONTINUE: 'title.navigation.createcontinue',
        CREATEREJECT: 'title.navigation.createreject',
        CREATEVERIFY: 'title.navigation.createverify',
        UPDATE: 'title.navigation.update',
        UPDATEVERIFY: 'title.navigation.updateverify',
        UPDATECONTINUE: 'title.navigation.updatecontinue',
        UPDATEREJECT: 'title.navigation.updatereject',
        DELETE: 'title.navigation.delete',
        DELETEVERIFY: 'title.navigation.deleteverify',
        DELETECONTINUE: 'title.navigation.deletecontinue',
        DELETEREJECT: 'title.navigation.deletereject',
        RESETPASSWORDVERIFY: 'title.navigation.resetpasswordverify',
        CHANGEUSERSTATUSVERIFY: 'title.navigation.changeuserstatusverify',
        CREATEINITIAL: 'title.navigation.create',
        UPLOAD: 'title.navigation.upload',
        UPLOADVIEW: 'title.navigation.uploadview',
        UPLOADVERIFY: 'title.navigation.uploadverify',
        CREATEBUYERVERIFY: 'title.navigation.createverify',
        CREATEBANKVERIFY: 'title.navigation.createverify',
        CREATEPREVIEWVERIFY: 'title.navigation.createverify',
        CREATEPREVIEW: 'title.navigation.preview',
        CREATEBANKPREVIEW: 'title.navigation.preview'
      },
      ALL: {
        '*': 'label.global.all'
      },
      PARM_VALUE_UITYPE: {
        I: 'label.dynaparm.parmvaluetype.input',
        L: 'label.dynaparm.parmvaluetype.dropdown',
        D: 'label.dynaparm.parmvaluetype.dynadropdown',
        S: 'label.dynaparm.parmvaluetype.lookup',
        P: 'label.dynaparm.parmvaluetype.password'
      },
      SETUP_DYNAPARM_LIST_DATATYPE: {
        'JAVA.LANG.BYTE': 'parm.type.byte',
        'JAVA.LANG.SHORT': 'parm.type.short',
        'JAVA.LANG.INTEGER': 'parm.type.integer',
        'JAVA.LANG.LONG': 'parm.type.long',
        'JAVA.LANG.CHAR': 'parm.type.char',
        'JAVA.LANG.FLOAT': 'parm.type.float',
        'JAVA.LANG.DOUBLE': 'parm.type.double',
        'JAVA.LANG.STRING': 'parm.type.string',
        'JAVA.UTIL.DATE': 'parm.type.date',
        'JAVA.SQL.DATE': 'parm.type.sqldate',
        'JAVA.SQL.TIMESTAMP': 'parm.type.timestamp',
        'JAVA.SQL.TIME': 'parm.type.time',
        'JAVA.MATH.BIGINTEGER': 'parm.type.biginteger',
        'JAVA.MATH.BIGDECIMAL': 'parm.type.bigdecimal'
      }
    });
})(angular);
